<?php
namespace Mp\Service\Widget;
use Illuminate\Contracts\Support\Renderable;

abstract class Input extends Widget implements Renderable{

	protected $name = 'name';

	protected $value = 'value';

	protected $style = '';

	protected $size = '';

	protected $addon = '';

	protected $placeholder = '请输入...';

	protected $data = [];



	protected $view = 'Mp::widgets.input';

	abstract protected function _init($params );

	public function render(){
		$this->data = array_merge($this->data,$this->attributes);
		return  view($this->view ,$this->data)->render();
	}

	//数据初始化
	public function data($params=[]){
		$this->_init($params);
		return $this;
	}

}